﻿@model ExcellOnServices.Models.Product

<div class="col-md-3 product-box">
	<a href="#" onclick="return showModalContact(@Model.Id);">
		<img src="@(Model.ImageUrl)">
		@(Model.Name)
		<br>
		@if (Model.Discount > 0) {
			var SalePrice = Model.Price - Model.Discount;
			var DiscountRate = Math.Ceiling(Model.Discount / Model.Price * 100);
			<span class="old-product-price">@String.Format("{0:C}", Model.Price)</span>
			<span class="product-price">@String.Format("{0:C}", SalePrice)</span>
			<span class="product-discount-rate">- @DiscountRate %</span>
		} else {
			<span class="product-price">@String.Format("{0:C}", Model.Price)</span>
		}
		<span class="btn-red">Order Now</span>
	</a>
</div>
